package com.yq.design.responsibility;

/**
 * @ClassName SchoolMasterApprover
 * @Description TODO
 * @Author yaoqiang
 * @Date 2021/8/25 15:58
 * @Version 1.0
 */
public class SchoolMasterApprover extends Approver  {
    public SchoolMasterApprover(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest p) {
        if (p.getPrice()>10){
            System.out.println(p.getId()+this.name);
        }else {
            approver.processRequest(p);
        }
    }
}
